package com.cfk.shopmail.cart.service;

/*
    @CreateTime 2022/1/6 14:34
    @CreateBy FengYaoWen
*/

import com.cfk.shopmail.cart.vo.Cart;
import com.cfk.shopmail.cart.vo.CartItem;

import java.util.List;
import java.util.concurrent.ExecutionException;

public interface CartService {
    CartItem addToCart(Long skuId, Integer num) throws ExecutionException, InterruptedException;

    //获取购物车某个购物项
    CartItem getCartItem(Long skuId);

    //获取购物车
    Cart getCart() throws ExecutionException, InterruptedException;

    //清空购物车
    void clearCart(String cartKey);

    //勾选购物项
    void checkItem(Long skuId, Integer check);

    //修改物品数量
    void changeItemCount(Long skuId, Integer num);

    //删除购物项
    void deleteItem(Long skuId);

    List<CartItem> getUserCartItems();
}
